1) Field of the Invention
The present invention relates to a server-load-balancing program, a server-load-balancing method, and a server-load-balancing apparatus which distribute over a plurality of servers a plurality of processing requests sent from clients so that the plurality of processing requests are processed by the plurality of servers in a distributed manner. In particular, the present invention relates to a server-load-balancing program, a server-load-balancing method, and a server-load-balancing apparatus which establish permanent connections with servers.
2) Description of the Related Art
In the case where a service is provided through a large-scale network such as the Internet, the service is provided by using a plurality of servers. At this time, it is desirable that processing requests from clients are processed in a distributed manner so that loads imposed on the respective servers are balanced. For this purpose, server-load balancing apparatuses which distribute among servers processing requests sent from clients are provided.
For example, each server-load-balancing apparatus is arranged between the Internet and a plurality of servers. Each processing request sent from a client which is connected to the Internet is first inputted into the server-load-balancing apparatus. The server-load-balancing apparatus monitors the load status of each server, and sends the processing request to one of the servers which has a function of executing the processing request and the load state of which allows execution of the processing request. Thus, it is possible to balance the loads imposed on the plurality of servers, and concurrently provide a service to a number of users with little delay.
The above server-load-balancing apparatus transmits the processing request to the server, and receives a response indicating a processing result from the server through a connection established on a network (a path logically established for communication). Normally, in communication using a connection, the connection is established at the beginning of the communication, and disconnected at the end of the communication.
However, in a construction in which each processing request to be transferred from a client to a server necessarily passes through a server-load-balancing apparatus, a response to each processing request is required to be prompt. In this case, the promptness of responses can be enhanced by establishing in advance connections between the server and the server-load-balancing apparatus.
That is, in the case where connections are preestablished, it is unnecessary to execute processing for establishing a connection at the time of transmission of a processing request. Therefore, it is possible to promptly distribute among servers processing requests received from clients. Hereinafter, connections preestablished as above are called permanent connections.
The number of permanent connections preestablished for each server is defined in advance in each server-load-balancing apparatus. When the service is started, each server-load-balancing apparatus establishes permanent connections corresponding to the predefined number. Thereafter, the established permanent connections are maintained during operation of the system. Therefore, the server-load-balancing apparatus can send each processing request to a server to which the processing request is to be distributed, immediately after the server is determined (without execution of processing for establishing a connection).
As explained above, when permanent connections are preestablished, processing requests sent from clients can be promptly distributed among clients. The processing for establishing permanent connections has been already realized as a function of web acceleration (see, for example, the Manual of Operation for IPCOM 100, P3NK-E332-02, pp. 52, Fujitsu Ltd., May 2002).
However, according to the conventional techniques, it is difficult to appropriately set the number of permanent connections. That is, in practice, the appropriate number of permanent connections varies with operational conditions of the system. Therefore, when actual operational conditions are different from expected operational conditions, permanent connections become superfluous or insufficient.
In the case where the permanent connections are insufficient, even when the server-load-balancing apparatus receives a request from a client, none of permanent connections to a server to which the request is to be transmitted may be available. When no permanent connection to the server to which a request is to be transmitted is available, it is necessary to establish a new connection, or wait until at least one of the permanent connections becomes available. Therefore, when shortage of permanent connections frequently occurs, the promptness of responses to processing requests is reduced.
In addition, when the number of the permanent connections is too great, a great number of permanent connections are unused, and therefore resources such as memories in the server-load-balancing apparatus and each server are uselessly occupied.